// 组成菜单
export const menus = [
  {
    path: "/home",
    name: "home",
    component: () => import("@/views/HomeView.vue"),
    meta: {
      title: "主页",
    },
  },
  {
    path: "/t/:id",
    name: "type",
    component: () => import("@/views/HomeView.vue"),
    meta: {
      title: "分类",
    },
  },
  {
    path: "/post/:id",
    name: "post",
    component: () => import("@/views/PostView.vue"),
    meta: {
      title: "文章",
    },
  },
];

const modRouters = [];

export const routers = [
  {
    path: "/",
    name: "base",
    component: () => import("@/layout/Index.vue"),
    redirect: "/home",
    children: [...modRouters, ...menus],
  },
  // {
  //   // 登录
  //   path: "/login",
  //   name: "login",
  //   component: () => import("@/views/Login.vue"),
  //   meta: {
  //     title: "登录",
  //   },
  // },
];
